Rendering process as a computer graphics may simulate interactions among all objects existing in a scene. However, the performance of the rendering process may be apparently improved by omitting the simulation of invisible objects because all objects may not be seen on a screen.
A technique of determining whether to render an object by predicting the visibility of the object before the rendering process is called culling or occlusion culling. In other words, culling is a technique of determining an invisible object concealed by other objects.
Culling may include view frustum culling (VFC), occlusion culling (OC) and the like.
While the VFC is a technique of omitting the rendering of objects outside a virtual camera's current angle of view, the OC is a technique of omitting the rendering of objects that are hidden, i.e., occluded, by other objects within an angle of view.
The VFC has been used in a lot of rendering engines and software because it can determine whether to render an object by only referring to the location of the object, i.e., inside or outside a view frustum.
Contrarily, the OC can determine whether to render an object by referring to information on whether the object is occluded by other object(s) or not. To determine whether it is occluded or not, relatively complicated calculations may be required. Such additional calculations may cause excessive load and therefore, the OC is difficult to be added to existing rendering engines and software. Accordingly, the OC is generally applied partly to the rendering engines and the software.
The basic process of the OC is as shown below. First, the OC classifies objects into occluders that may conceal other objects and occludees that may be concealed by other objects. Next, the OC renders the occluders, and then creates depth buffers of the rendered occluders. After that, the OC renders or projects bounding objects (e.g., bounding box, bounding sphere, etc.) as geometric objects that entirely cover the occludees. Then, when all depths within image areas of the rendered or projected bounding objects are far from those of the occluders, the OC determines that the occludees are occluded. The concept as explained above is commonly applied to most OC techniques.
Depending on methods of determining whether to occlude occludees, the OC, furthermore, may be classified into two kinds of methods as explained below.
The first method as a traditional method is a technique of creating and using a hierarchical occlusion map. It is a method for configuring a depth buffer for occluders only hierarchically by using, e.g., mipmap or N-buffers, and comparing information on depths in the depth buffer configured hierarchically with depths of bounding objects of occludees. However, this cannot be widely used because it has problems such as load caused by creating the hierarchical structure, load caused by calculations to determine whether objects are occluded or not, or failure in bringing the result after an occlusion test effectively to a memory of a central processing unit (CPU).
The second technique is a method for determining visibility by using hardware occlusion queries (HOQs) recently provided by graphics hardware. Under the method, the graphics hardware renders occludees and counts the number of pixels closer than the depth buffer of occluders without any hierarchical structure among the pixels of the rendered occludees. When there is no pixel closer than the depth buffer of the occluders, the graphics hardware determines that the occludees have been entirely occluded and returns the result of the determination. To prevent corresponding objects from being drawn during the rendering process, the result of the determination must be transmitted to the CPU. However, each HOQ is performed in a unit of one object and considerable load is required to transmit the result of the determination in the unit of one object. Accordingly, it is not easy to improve the performance of rendering even by using HOQs and therefore, the HOQs are not easy to use commonly.
As advanced techniques of improving HOQs, there are coherent hierarchical culling (CHC) and CHC++ as a more improved technique than the CHC. The CHC++ does not immediately transmit the result of occludees to the CPU from a graphic processing unit (GPU) and delays the transmission until the next frame is processed. In addition, the CHC++ reduces load by transmitting only objects required for a scenegraph. However, even in the CHC++ process, if there are multiple objects, there are problems such as load of transmission and load of determining whether the objects are occluded. Because the CHC should process rendering and culling simultaneously, the CHC is not suitable for the existing rendering engines and software in which rendering is performed separately after culling is performed for all objects. Accordingly, the CHC is difficult to be used practically and also to be applied to multi-GPU rendering.
Therefore, the present inventor came to develop occlusion culling technology which can be easily applied to the existing rendering engines or software while reducing the load of determining whether to occlude.